#define _CRT_SECURE_NO_WARNINGS 1

bool containsDuplicate(vector<int>& nums) {
    unordered_map<int, int> hash;
    for (auto& n : nums) {
        hash[n]++;
        if (hash[n] >= 2) return true;
    }
    return false;
}